<html>
 <head>
  <title>MVP Log example</title>
  <link type="text/css" rel="stylesheet" href="ext/resources/css/ext-all.css"></script>
  <link rel="stylesheet" type="text/css" href="wireit/WireIt.css"/>
 </head>
 <body>

  
  <h1>Example of visualization of activity nodes</h1>
  Note: Uses ExtJS, which is commercial/GPL. Go to <a href="http://extjs.com">ExtJS</a> for more information.<br/><br/><br/>

  <script type="text/javascript" src="mvp-log-api.js"></script>
  <script type="text/javascript" src="wireit/utilities.js"></script>
  <script type="text/javascript" src="wireit/WireIt.js"></script>
  <script type="text/javascript" src="wireit/CanvasElement.js"></script>
  <script type="text/javascript" src="wireit/Wire.js"></script>
  <script type="text/javascript" src="wireit/Terminal.js"></script>
  <script type="text/javascript" src="wireit/Anim.js"></script>
  <script type="text/javascript" src="wireit/DD.js"></script>
  <script type="text/javascript" src="wireit/DDResize.js"></script>
  <script type="text/javascript" src="wireit/Container.js"></script>
  <script type="text/javascript" src="wireit/Layer.js"></script>
  <script type="text/javascript" src="wireit/Layout.js"></script>
  <script type="text/javascript" src="wireit/DotToJSON.js"></script>
  <script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
  <script type="text/javascript" src="ext/ext-all.js"></script>  
  <script type="text/javascript" src="mvp-log-activitynodeVisualization.js"></script>

  <form>
   <label for="type">Event-Type</label>
   <select id="type">
    <option>ACTIVITY_NODE_SHOWN</option>
    <option>DAMN_NODE_SHOWN</option>
    <option>DAMN_NODE_ITEM_SHOWN</option>
    <option>DAMN_NODE_ITEM_TRIGGERED</option>
    <option>VPD_TEXT_SHOWN</option>
    <option>MEDICATION_SHOWN</option>
    <option>INTERVIEW_ITEM_SHOWN</option>
    <option>PHYSICAL_EXAM_SHOWN</option>
    <option>DIAGNOSTIC_TEST_SHOWN</option>
    <option>DIAGNOSIS_SHOWN</option>
    <option>INTERVENTION_SHOWN</option>
   </select>
   <br />
   <label for="id">ID</label>
   <input type="text" id="elID" />
   <br />
   <button onclick="fireEvent();return false">Fire event</button>
   <br />
   <br />
   <button onclick="document.getElementById ('type').selectedIndex = 0; var id = document.getElementById ('elID'); id.value = 'Slide #1';fireEvent (); id.value = 'Slide #2';fireEvent (); id.value = 'Slide #3';fireEvent (); id.value = 'Slide #2';fireEvent (); id.value = 'Slide #3';fireEvent (); id.value = 'Slide #1';fireEvent ();return false">ActivityNode-Demo</button>
  </form>

  <script type="text/javascript">
   fireEvent = function () {
    try {
     medbiq.mvp.log.fireSpecEvent ({
      type: medbiq.mvp.log.Type[document.getElementById ('type').options[document.getElementById ('type').selectedIndex].text],
      elementID: document.getElementById ('elID').value,
      userID: 'dummy'
      });
     } catch (ex) { alert (ex); }
    }
  </script>



 </body>
</html>